package com.wanxx.controller;

import com.wanxx.domain.Student;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpSession;


@Controller
public class MyController {

    @RequestMapping(value = "/login.do")
    public ModelAndView doRegister(Student student){
        ModelAndView mv = new ModelAndView();
        mv.addObject("name", student.getName());
        mv.addObject("age", student.getAge());
        mv.setViewName("show");
        return mv;
    }


}
